import request from '@/utils/request'

// 编辑详情
export function getFindById(id) {
  return request.get('/storage/findById/' + id)
}

// 删除
export function deleteById(id) {
  return request.delete('/storage/del/' + id)
}

//新增 
export function add(form) {
  return request.post('/storage/save', form)
}

//修改
export function update(form) {
  return request.put('/storage/save', form)
}

//获取分页数据 
export function page(form, pageSize, currentPage) {
  return request.post('/storage/page', {
    param: form,
    pageSize: pageSize,
    pageNo: currentPage
  })
}

// 根据门店id获取仓库
export function findByStore(storeId) {
  return request.get('/storage/findByStore/' + storeId)
}

// 是否调拨给其他门店
export function openRestsStore(id) {
  return request.get('/storage/openRestsStore/' + id)
}
